import request from '../request'

const Api = {
  page: '/api/sys/ac/page',
  apply: '/api/sys/ac/apply',
  applyAudit: '/api/sys/ac/applyAudit',
  applyRefuse: '/api/sys/ac/applyRefuse',
  applyReturn: '/api/sys/ac/applyReturn',
}

/** 查询日志 */
export const page = data => {
  return request.request({
    url: Api.page,
    params: data,
    method: 'GET'
  })
}

/** 使用申请 */
export const apply = data => {
  return request.request({
    url: Api.apply,
    data: data,
    method: 'POST'
  })
}
/** 归还 */
export const applyReturn = data => {
  return request.request({
    url: Api.applyReturn,
    data: data,
    method: 'POST'
  })
}

/** 审批通过 */
export const applyAudit = data => {
  return request.request({
    url: Api.applyAudit,
    params: data,
    method: 'POST'
  })
}
/** 审批拒绝 */
export const applyRefuse = data => {
  return request.request({
    url: Api.applyRefuse,
    params: data,
    method: 'POST'
  })
}
